python logger with thread names

```python
import logging
import os
import sys
from collections.abc import MutableMapping
from typing import Any
import asyncio
import threading

from utils import request_id  # type: ignore


class CustomAdapter(logging.LoggerAdapter):
    """This adapter adds request ID and execution context (thread/task info) to the log message."""

    def process(
        self, msg: str, kwargs: MutableMapping[str, Any]
    ) -> tuple[str, MutableMapping[str, Any]]:
        thread_name = threading.current_th

python logger with thread names

```python
import logging
import os
import sys
from collections.abc import MutableMapping
from typing import Any
import asyncio
import threading

from utils import request_id  # type: ignore


class CustomAdapter(logging.LoggerAdapter):
    """This adapter adds request ID and execution context (thread/task info) to the log message."""

    def process(
        self, msg: str, kwargs: MutableMapping[str, Any]
    ) -> tuple[str, MutableMapping[str, Any]]:
        thread_name = threading.current_th

React notes

export default function Order () {
  return();
};

the same is

const Order = () => {
  return();
};

export default Order;

but the first one helps with debigging. 
the function name will show up in a stack trace

Get-WUVersionInfo

function Get-WUVersionInfo {
    $DISMDetails = & "${env:windir}\system32\dism.exe" /Online /Get-Packages /Format:Table | ? {$_.Contains("|") -and -not $_.StartsWith("-")} | % {($_.Split('|').Trim() -join ',')} | ConvertFrom-Csv
    $DISMDetails | Where-Object 'Package Identity' -match '^Package_for_(RollupFix|ServicingStack)' | ForEach-Object {
        $Package = $_
        $PackageName = $Package.'Package Identity'.Split('~')[0]
        $InstalledOn = $Package.'Install Time'
        swit

2411. Smallest Subarrays With Maximum Bitwise OR

You are given a 0-indexed array nums of length n, consisting of non-negative integers. For each index i from 0 to n - 1, you must determine the size of the minimum sized non-empty subarray of nums starting at i (inclusive) that has the maximum possible bitwise OR. In other words, let Bij be the bitwise OR of the subarray nums[i...j]. You need to find the smallest subarray starting at i, such that bitwise OR of this subarray is equal to max(Bik) where i <= k <= n - 1. The bitwise OR of an array is the bitwise OR of all the numbers in it. Return an integer array answer of size n where answer[i] is the length of the minimum sized subarray starting at i with maximum bitwise OR. A subarray is a contiguous non-empty sequence of elements within an array.
/**
 * @param {number[]} nums
 * @return {number[]}
 */
var smallestSubarrays = function(nums) {
    const n = nums.length;
    const answer = new Array(n).fill(1);        // Result array
    const latestSeenBit = new Array(32).fill(-1); // Tracks last index each bit is seen

    for (let i = n - 1; i >= 0; i--) {
        // Update latestSeenBit with bits from nums[i]
        for (let b = 0; b < 32; b++) {
            if ((nums[i] & (1 << b)) !== 0) {
                latestSeenBit[b] = i;
      

CORS

# CORS (Cross-Origin Resource Sharing) is a security feature implemented by web browsers that prevents web pages from making requests to 
a different domain, protocol, or port than the one serving the web page. 
This is a security measure to protect users from malicious websites.

The Problem:
When developing a React application (like yours), you typically have:
Frontend: Running on http://localhost:5173 (Vite's default dev server)
Backend API: Running on a different port, like http://localhost:

Change browser URL without reload

const newParams = new URLSearchParams({ orientation: "landscape", width: "1600", height: "2560" });
window.history.pushState({}, "", "?" + newParams.toString());

frontend React setup

## React reference

# Complete Setup Sequence 
1. npm create vite@latest . --template react    # Creates React app with Vite (includes vite + react plugin)
2. npm install --save-dev prettier              # Add Prettier
3. npm install --save-dev eslint@^9.32.0 eslint-plugin-react@^7.34.0  # Add ESLint
4. Add config files (.prettierrc, eslint.config.mjs)
5. Add scripts to package.json
6. Add to existing .gitignore(look below)
7. npm run dev                                  # Start development serv

App Portal - Computer Name Detection Method Report

$smtpFromAddress = ""
$smtpToAddresses = @(
    ''
)
$ReportName = "App Portal - Computer Name Detection Method Report"

function Get-FlexeraAppPortalNameResolution {
    [CmdletBinding()]
    param(
        [System.IO.FileInfo[]]$Path
        ,
        [string]$ClientIP
    )

    function ConvertFrom-IISLog {
        [CmdletBinding()]
        param(
            [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
   

Liquid, JS - base swiper slider

<base-swiper
      id="collection-swiper--{{ section.id }}"
      class="{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
      data-config='{
        "slidesPerView": {{ section.settings.columns_desktop }},
        "autoplay": {{ section.settings.enable_autoplay }},
        "loop": {{ section.settings.enable_loop }},
        "spaceBetween": 20,
        "speed": 600,
        "centerInsufficientSlides": true,
        "delay": {{ section.settings

DRI Mini product card example

{% comment %}
  --------------------------------------------------------------------------------------------------------------
  SUPPORTED PARAMETERS
  --------------------------------------------------------------------------------------------------------------

  * product *required
  * current_variant
{% endcomment %}

{%- if product != blank -%}
  {%- liquid
    unless current_variant
      assign current_variant = product.selected_or_first_available_variant
    endunless

    assign product

Networking

sudo ip route add default via 192.168.254.9

Related Posts Widget

matrix pp that will pull 3 random posts and display them at the end of the post. If a post has tags, the widget will find posts that contain said tags, if not, it will display random 3 posts of most 5 most recent posts. Requires blog detail template to have following: `const postTags = {{ Tags | map: 'Label' | json:false}};` `const currentPost = {{ Entry | json:false }};`
{% assign allPosts = Module.FieldValues.BlogSource.Entries %}
{% assign maxPosts = Module.FieldValues.MaxRelated %}
{% assign blogLink = SitePage.Slug %}


<div class="pp-related-content-widget hidden">
   <h3>Related Content</h3>
   <ul class="related-posts-list"></ul>
</div>

<script>

const allPosts = {{ allPosts | json:false  }};
// const currentPost =  Entry | json:false ;

console.log('all posts', allPosts);

function getRelatedPosts(current, posts, postTags, count = {{max

IntersectionObserver

The `IntersectionObserver` API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with the viewport. It's particularly useful for implementing lazy loading, infinite scrolling, and triggering animations when elements come into view.
Basic Syntax and Constructor


const observer = new IntersectionObserver(callback, options);

The constructor takes two parameters:
- **callback**: A function executed whenever the observed element's intersection changes
- **options**: An optional object to customize the observer's behavior

Callback Function

The callback receives two parameters:


function callback(entries, observer) {
    entries.forEach(entry => {
        // Process each intersection change
    });
}

Int

nginx conf new

server {
    server_name newjourney.online;
    root /mnt/storage2/alpha;
    index index.php index.html index.htm;

    client_max_body_size 150M;
    add_header X-Server-Name "alpha";

    location ~ ^/(ru|en)/(.+\.(?:jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot|webp|mp4))$ {
        try_files /$2 =404;
    }

    location ~* ^/(assets|core|connectors|manager|rest|\.well-known) {
        try_files $uri $uri/ @php;
    }

    location / {
        try_files $uri $uri/index